<template>
  <div class="grid">
    <div class="show-block">
      <em-row>
        <em-col :style="style1" :span="6">
          <div :style="style2">1</div>
        </em-col>
        <em-col :style="style1" :span="6">
          <div :style="style2">2</div>
        </em-col>
        <em-col :style="style1" :span="6">
          <div :style="style2">3</div>
        </em-col>
        <em-col :style="style1" :span="6">
          <div :style="style2">4</div>
        </em-col>
      </em-row>
    </div>
    <div class="show-block">
      <em-row >
        <em-col :style="style1" :span="6" :offset="2">
          <div :style="style2">offset = 2</div>
        </em-col>
        <em-col :style="style1" :span="6" :offset="2">
          <div :style="style2">offset = 2</div>
        </em-col>
      </em-row>
    </div>
    <div class="show-block">
      <em-row  type="flex">
        <em-col class="height1 color1" :span="6">
          <div class="">F</div>
        </em-col>
        <em-col class="height2 color2" :span="6">
          <div class="">L</div>
        </em-col>
        <em-col class="height3 color1" :span="6">
          <div class="">E</div>
        </em-col>
        <em-col class="height4 color2" :span="6">
          <div class="">X</div>
        </em-col>
      </em-row>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      style1: { height: 40 + 'px' },
      style2: { background: '#00bfff', height: 40 + 'px' }
    }
  },
  methods: {
    handleClick (event) {
      console.log(event)
      this.type = this.type === 'primary' ? 'danger' : 'primary'
    },
  },
}
</script>
<style lang="scss">
  .grid div {
    text-align: center;
    vertical-align: middle;
    line-height: 40px;
  }
  .show-block {
    margin: 20px 0;
  }
  .height1 {
    height: 60px;
  }
  .height2 {
    height: 40px;
  }
  .height3 {
    height: 80px;
  }
  .height4 {
    height: 50px;
  }
  .color1 {
    background: #00bfff;
    color: white;
  }
  .color2 {
    background: #0e77ca;
    color: white;
  }
</style>
